<template>
    <view class="set">
        <view class="set-center">
            <view class="set-item" @click="goSetInfo()">
                <u-icon name="account" color="#0C1028" size="22"></u-icon>
                <view class="set-item-text">个人资料</view>
                <u-icon name="arrow-right" color="#7B8087" size="18"></u-icon>
            </view>
            <view class="set-item" @click="goVerifyPwd()">
                <u-icon name="lock" color="#0C1028" size="22"></u-icon>
                <view class="set-item-text">修改密码</view>
                <u-icon name="arrow-right" color="#7B8087" size="18"></u-icon>
            </view>
        </view>
        <view class="out">
            <view class="out-text" @click="outHandle">退出登录</view>
        </view>
    </view>
</template>

<script>
export default {
    data() {
        return {

        }
    },
    onLoad() {

    },
    onShow() {

    },
    methods: {
        goSetInfo() {
            uni.navigateTo({
				url: '/pages/people/info'
			})
        },
        // 修改密码
		goVerifyPwd() {
			uni.navigateTo({
				url: '/pages/people/verifyPwd'
			})
		},
        outHandle() {
            uni.showModal({
                title: '提示',
                content: '确定要退出登录吗？',
                success: function (res) {
                    if (res.confirm) {
                        uni.removeStorageSync('token')
                        uni.reLaunch({
                            url: '/pages/login/index'
                        })
                    } else if (res.cancel) {
                        console.log('用户点击取消');
                    }
                }
            });
        }
    }
}
</script>

<style scoped lang="scss">
.set-center {
    padding: 0 32rpx;
}
.set-item {
    display: flex;
    border-radius: 20rpx;
    background: rgba(255, 255, 255, 1);
    padding: 30rpx;
    margin-top: 32rpx;
    .set-item-text {
        flex: 1;
        font-size: 32rpx;
        font-weight: 400;
        color: rgba(12, 16, 40, 1);
    }
}
.out {
    width: 100%;
    padding: 0 32rpx;
    box-sizing: border-box;
    position: fixed;
    bottom: 32rpx;

    .out-text {
        border-radius: 24rpx;
        background: rgba(77, 172, 177, 1);
        height: 48px;
        line-height: 48px;
        text-align: center;
        font-size: 32rpx;
        font-weight: 500;
        color: rgba(255, 255, 255, 1);
    }
}
</style>